Search and Replace Commands

BEAV has very powerful search and replace commands. The search and replace string can be entered in any of the display modes. The search and replace strings can each be up to 256 bytes long. The display mode can be changed at any time while entering the string. Wild cards can be placed down to the bit level on both the search and replace strings. The wild card character, `?', will match any value that it is compared with.

When a wild card is placed in the replace string it leaves the destination data unchanged at that position. Thus, if the destination contains the ASCII string `41 42 43 44' and the replace string contains `66 67 ?? 69' the result would be `66 67 43 69'.

Wild cards can be placed in any position that makes sense. If you want to use wild cards in an ASCII string then you must switch to another mode to enter them. You can then switch back to ASCII mode. In this case a `?' will appear in the position where the wild card has been placed but it appears exactly the same as a standard question mark. In fact if you type a `?' over the wild card there will be no apparent change. However, the character will no longer be a wild card but a standard question mark. To see the true wild cards you must use a data display mode. In fact if the wild card has been set on the bit level then you must go to binary display mode to see its actual position.

The commands to change the display mode in search and replace are the same as for the window display mode. The search and replace strings can be scrolled back an forth and the cursor moved using the same commands as for the window. While performing a replace command you can switch between the search string and replace string by using the `move-back-page' or `move- forw-page' commands.



        678901234567890123456789012345678901234567890
 		 Esc S 		 search-forw 		 F3
        

Prompts for a search string then searches from the current cursor position for the first match. The cursor is positioned at the first unit of the match.



        678901234567890123456789012345678901234567890
 		 Esc R 		 search-back 		 
        

This command is the same as the previous one except that it searches backward.



        678901234567890123456789012345678901234567890
 		 Esc T 		 search-again 		 F4
        

This command repeats the previous search command, forward or backward. The cursor is first moved one byte in the appropriate direction before the search is repeated.



        678901234567890123456789012345678901234567890
 		 Esc % 		 replace 		 F5
        

Prompt for search string. After entering the search string hit return and you will be prompted for the replace string. After entering the replace string hit return. BEAV will then search for the first match with the search string. If a match is found you will be prompted with `(R)eplace, (S)kip, (A)ll, (O)ne, (Q)uit'

If you type a `R' the replace will be done at this location and the search will continue. If you type a `S' the replace will not be done and search will continue. If you type an `A' the replace will be done and will be done at all future matches without pausing for conformation. If you type an `O' the replace will be done at this location and the search will stop. If you type a `Q' then the search will be terminated.



        678901234567890123456789012345678901234567890
 		 Ctl-R 		 recall-srch-string 		 
        

If you enter search or replace previously used strings can be recalled with this command.